<template>
  <div id="zb_app">
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive"></router-view>
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive"></router-view>
  </div>
</template>

<script>
export default {
  name: "App",
  // //挂载后
  // mounted() {
  //   window.addEventListener("unload", this.saveState);
  // },
  // //方法
  // methods: {
  //   saveState() {
  //     sessionStorage.setItem("state", JSON.stringify(this.$store.state));
  //   }
  // }
};
</script>


<style lang="scss">
* {
  padding: 0;
  margin: 0;
  list-style: none;
}
html,
body,
#zb_app {
  width: 100%;
  height: 100%;
}

</style>
